package file;

import java.io.File;

public class Test3 {
    public static void main(String[] args) {
        File dir = new File("./a");
        deleteFile(dir);

    }

    private static void deleteFile(File f) {
        if (f.isDirectory()){
            File[] subs =f.listFiles();
            for (File sub:subs){
                deleteFile(sub);
            }
        }
        f.delete();
    }

}
